from apscheduler.schedulers.blocking import BlockingScheduler

from data.duty_mixin import DutyMixin
from data.tgsv_mixin import TgsVolumeMixin

if __name__ == '__main__':
    job1 = DutyMixin().cal
    job2 = TgsVolumeMixin().cal_tgsvolume

    scheduler = BlockingScheduler()
    scheduler.add_job(job1, 'interval', seconds=10)
    scheduler.add_job(job2, 'interval', seconds=10,max_instances=3)
    scheduler.start()